package com.webchat.dao;

import com.webchat.Utils.HibernateUtil;
import com.webchat.model.UsersChatRecordsEntity;
import org.hibernate.Session;

/**
 * Created by YongX on 2016/8/21.
 */
public class UsersChatRecordsDao {


    public void save(UsersChatRecordsEntity entity){
        Session session = HibernateUtil.getSessionFactory().openSession();
        session.beginTransaction();
        session.save(entity);
        session.getTransaction().commit();
        session.close();
    }
}
